<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.Map"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Iterator"%>
<%@ page import="jt.classic.system.group.IGroup"%>
<%@ page import="jt.classic.system.user.IUser"%>
<%@ page import="org.limp.mine.Label"%>
<%@ page import="org.limp.mine.HTMLTool"%>
<%@ page import="org.limp.mine.Controller"%>
<%@ page import="org.limp.mine.DateTrimmer"%>
<%@ page import="jt.classic.system.wordbook.XWordbook"%>
<%
	String context = jt.classic.system.ISystem.getContextPath();
	Object[] result = (Object[]) request.getAttribute("result");
	Label label = (Label) result[1];
	Controller controller = (Controller) result[2];
	String pageNO = (String) result[3];
	List resultList = (List) result[0];

	Map query = (Map) request.getAttribute("query");

	List list = (List) request.getAttribute("list");

	/*列表类型*/
	String listtype = "directory";//(String)request.getAttribute("listtype");

	String qname = (String) query.get("qname");
	String qtype = (String) query.get("qtype");
	String qdirec = (String) query.get("qdirec");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>信息列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<jsp:include page="../head.jsp"></jsp:include>
<script language="javascript">
  function handleQuery(){
      document.form1.action = context + "/app/info.do?method=listinfo4select";
      document.form1.submit();
  }
  
  function handleSelectInfo(id,name){
      parent.setinfo(id,name);
  }
  
  function responseResult(ids,names,types){
      document.form1.qdirec.value = names;
      closeDialog();
  }
</script>
<body>
<form name="form1" method="post" action=""><input type="hidden"
	name="pageNO" value="<%=pageNO%>">

	<div>
	 标题 <input style="width:100px;" type="text" name="qname"
				value="<%=qname%>" class="box2">
	 <img src="<%=context %>/app/info/images/search.png" title="查询栏目信息" style="cursor:hand;margin-bottom:-4px;" onclick="javascript:handleQuery();"/>
	</div>
	<table class="tbl" align="center">
	<thead>
	<tr>
		<td class="td1"
			width="20" align="center">&nbsp;</td>
		<td class="td1"
			width="180" align="center">&nbsp;<font color="#4C4C4C">标题</font></td>
		<td class="td1"
			width="100" align="center">&nbsp;<font color="#4C4C4C">所属栏目</font></td>
		<td class="td1"
			width="50" align="center">&nbsp;<font color="#4C4C4C">发布时间</font></td>
		<td class="td1"
			width="50" align="center">&nbsp;<font color="#4C4C4C">发布人</font></td>
	</tr>
	</thead>
	<tbody>
	<%
			if (resultList != null && !resultList.isEmpty()) {
			for (int i = 0; i < resultList.size(); i++) {
				Map info = (Map) resultList.get(i);
				String number = (String) info.get("PAGINATION_NUMBER");
				String title = HTMLTool.htmlEscape((String) info
				.get("IF_TITLE"));
				String itname = (String) info.get("IT_NAME");
				String idname = (String) info.get("ID_NAME");
				String date = (String) info.get("IF_DATE");
				String username = (String) info.get("IF_USERNAME");
				String id = (String) info.get("IF_ID");
	%>
	<tr onMouseOver="javascript:this.bgColor='#ffff99'"
		onmouseout=" javascript:this.bgColor='#ffffff'" bgColor="#ffffff">
		<td align="center"><input type="radio" name="chk"
			value="<%=id%>"
			onclick="javascript:handleSelectInfo('<%=id%>','<%=title%>');">
		</td>
		<td align="center"><div class="listtitle" style="width:250px;" title="<%=title%>"><a target="_blank"
			href="<%=context%>/app/info.do?method=viewinfo&id=<%=id%>"><%=title%></a></div></td>
		<td align="center"><div class="listtitle" style="width:150px;"><%=idname%></div></td>
		<td align="center">&nbsp;<%=DateTrimmer.getYMD_LBL(date)%></td>
		<td align="center"><%=username%></td>
	</tr>
	<%
		}
		}
	%>
	</tbody>
</table>
<div id="pager"><div style="float:left;padding:5px;"><%=label.displayLabel()%>
					</div> <div style="float:right;padding:5px;"><%=label.startLabel()%> <%=label.previousLabel()%>
						<%=label.nextLabel()%> <%=label.endLabel()%> 
				<%=controller.getController().toString()%></div>
				</div>
				<%=controller.getControlScript(true)%></form>
</body>
</html>
